﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>技术指标 - ShadowStock 影子证券(新浪版)</title>
    <meta name="description" content="简洁精悍的上班族隐蔽看股工具，链接新浪财经实时数据源，支持自选股、实时价格刷新、持仓盈亏统计，更支持单元格高亮着色；加上《Shadowin 影窗浏览器》提供的半透明窗体和老板键特性，更是神不知鬼不觉" />
    <link href="favicon.ico" rel="shortcut icon" />
    <style type="text/css">
        body {
            margin: 10px;
            font-family: Verdana;
            font-size: 12px;
        }

        .Title {
            font-size: 14px;
            font-weight: bold;
            color: #CC3300;
            text-decoration: underline;
        }

        #TIContainer {
            width: 100%;
            word-break: break-all;
        }

            #TIContainer img {
                margin: 10px;
                border: solid 1px #FF9900;
            }

        .Footer {
            font-size: 12px;
            color: #999999;
            right: 0px;
            bottom: 0px;
            position: absolute;
            margin: 10px;
        }

            .Footer a {
                font-size: 12px;
                color: #690;
            }

        .Ad {
            margin-top: 15px;
            width: 100%;
            text-align: right;
        }
    </style>

    <script type="text/javascript">
        /* ******************* 常量 ******************* */
        var TIFormats = new Array
        (
        '<img title="MACD" alt="MACD {0}" src="http://image.sinajs.cn/newchart/macd/n/{0}.gif?{1}" />',
        '<img title="KDJ" alt="KDJ {0}" src="http://image.sinajs.cn/newchart/kdj/n/{0}.gif?{1}" />',
        '<img title="RSI" alt="RSI {0}" src="http://image.sinajs.cn/newchart/rsi/n/{0}.gif?{1}" />'
        );

        /* ******************* 公共 ******************* */
        function GenerateTimeID() {
            var now = new Date();
            return now.getFullYear().toString()
                + (now.getMonth() + 1).toString()
                + now.getDate().toString()
                + now.getHours().toString()
                + now.getMinutes().toString()
                + now.getSeconds().toString()
                + now.getMilliseconds().toString()
        }
        function FormatString(string) {
            var result = string;
            for (var i = 1; i < arguments.length; i++) {
                var pattern = new RegExp("\\{" + (i - 1) + "\\}", "g");
                result = result.replace(pattern, arguments[i].toString());
            }
            return result;
        }

        /* ******************* 功能 ******************* */
        function ShowTI() {
            var tiContainer = document.getElementById("TIContainer");
            var stockCode = window.location.toString().split("?")[1];

            var tiHtml = "<p class=Title>" + stockCode.replace(/^s[hz]/g, "") + "</p>";
            for (var tiFormat in TIFormats) {
                tiHtml += FormatString(TIFormats[tiFormat], stockCode, GenerateTimeID());
            }

            tiContainer.innerHTML = tiHtml;
        }
    </script>

</head>
<body onload="ShowTI();">
    <div id="TIContainer">
    </div>
    <div class="Ad">
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <!-- 页脚链接 -->
        <ins class="adsbygoogle"
             style="display:inline-block;width:468px;height:15px"
             data-ad-client="ca-pub-9815729917864928"
             data-ad-slot="2583230930"></ins>
        <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
    </div>
    <div class="Footer">
        Powered by Hedda.
        <script language="javascript" type="text/javascript" src="http://js.users.51.la/18940996.js"></script>
    </div>
</body>
</html>
